package com.alibaba.algo.cooperation.usercomponent.service.user;

import com.alibaba.algo.cooperation.common.BaseResult;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.SelectEmployeeOrgByOrgIdRequestVO;
import com.alibaba.algo.cooperation.usercomponent.vo.req.user.SelectEmployeeRequestVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 类SysEmployeeOrgService.java的实现描述：员工和组织关联表 service
 *
 * @author nieganggang 2021-03-12 16:08:17
 */
@FeignClient(url="${feign.userCenterUrl:}", value = "usercenter-service", contextId = "usercenter-app")
public interface SysEmployeeOrgService {

    @RequestMapping(value = "/sysEmployeeOrg/insert", method = RequestMethod.POST)
    void insert(@RequestParam("employeeId") Long employeeId, @RequestParam("orgId") Long orgId);

    @RequestMapping(value = "/sysEmployeeOrg/deleteByEmployeeId", method = RequestMethod.POST)
    void deleteByEmployeeId(@RequestParam("employeeId") Long employeeId);

    /**
     * 根据组织id查询组织下的员工
     *
     * @param vo 组织编码
     * @return
     */
    @RequestMapping(value = "/sysEmployeeOrg/selectListByOrgId", method = RequestMethod.POST)
    BaseResult selectListByOrgId(@RequestBody SelectEmployeeOrgByOrgIdRequestVO vo);

    @RequestMapping(value = "/sysEmployeeOrg/selectEmployeeListInOrgByName", method = RequestMethod.POST)
    BaseResult selectEmployeeListInOrgByName(@RequestBody SelectEmployeeRequestVO vo);

}
